package jvm;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by duan lian on 2017-08-03.
 */
public class HeapOOM {
	// VM args: -Xmx20m -Xms20m -XX:+HeapDumpOnOutOfMemoryError
	private static class A{}

	public static void main(String[] args) {
		List<A> list=new ArrayList<>();
		while(true) {
			list.add(new A());
		}
	}
}
